<%@ page language="java" import="java.util.*,base.*,pojo.*,service.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>修改密码</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <style type="text/css">
    .container{
    width:300px;
    
    
    
    }  
    </style>
<script type="text/javascript" src="../jquery/jquery-1.6.1.js"></script>
<script type="text/javascript">
$(function(){
	$("#ok").click(function(){
	var password=$("#password").val();
	var password1=$("#password1").val();
	var password2=$("#password2").val();
	if(password==""){
	 $("#msg").html("请输入密码");
	 $("#password").focus();
	}
	else if(password1==""){
	 $("#msg").html("请输入新密码 ");
	  $("#password1").focus();
	}
	else if(password2==""){
	 $("#msg").html("请输入确认密码 ");
	 $("#password2").focus();
	}
	else if(password1!=password2){
	
	$("#msg").html("输入的密码和确认密码不一致 ");
	$("#password1").focus();
	
	}
	
	else if (password1.length<6||password.length>15){
	$("#msg").html("密码填写不正确，请在5到15个字符之间");
	 $("#password1").focus();
	}
else {
      $("#form").submit()
}
	
	})
})
</script>
  </head>
  <body>
  <%
request.setCharacterEncoding("UTF-8");
%>
    <div class="container">
    <form class="form-signin" id="form" action="../action/websiteAction/updatePassword.jsp" method="post">
<input class="input-block-level" type="text" id="password" name="password" placeholder="原密码" >
<input class="input-block-level" type="password" id="password1" name="password1" placeholder="新密码">
<input class="input-block-level" type="password" id="password2" name="password2" placeholder="确认新密码">
<button class="btn btn-large btn-primary" type="button" id="ok">确认</button>&nbsp;&nbsp;&nbsp;<button class="btn btn-large btn-primary" type="reset">重置</button>
</form>
    <center> <span id="msg" style="color:red;font-size:20px;"></span></center>
    
    </div>
    <script src="../bootstrap/js/bootstrap.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>
